package com.rongke.model;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.rongke.utils.DateJsonDeserializer;
import com.rongke.utils.DateJsonSerializer;
import org.springframework.format.annotation.DateTimeFormat;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @Orders
 * @订单(orders)
 * @version : Ver 1.0
 */
@TableName("orders")
public class Orders implements Serializable {
	@TableField(exist = false)
	private static final long serialVersionUID = 1L;

	/**
	 * @备注:订单id
	 * @字段:id BIGINT(19)
	 */
	@TableId(type = IdType.AUTO)
	private Long id;


	/**
	 * @备注:用户id
	 * @字段:muser_id BIGINT(19)
	 */
	private Long muserId;


    /**
     * 用户信息
     */
    @TableField(exist=false)
    private Muser muser;


	/**
	 * @备注:收货地址id
	 * @字段:address_id BIGINT(19)
	 */
	private Long addressId;
	/**
	 * 收货地址
	 */
	@TableField(exist = false)
	private Address address;



	/**
	 * 订单内商品、sku等详情
	 */
	@TableField(exist = false)
	private List<OrderGoods> orderGoodsList;


	/**
	 * @备注:订单号
	 * @字段:order_number VARCHAR(20)
	 */
	private String orderNumber;

	private String outTradeNo;

	private String buyTogetherCode;
    /**
     * @备注:订单产品线（0 蜜哆哆 1蜜雅阁）
     * @字段:source_type INT(10)
     */
    private java.lang.Integer sourceType;

    /**
	 * @备注:订单总价
	 * @字段:total_price DECIMAL(11)
	 */
	private java.math.BigDecimal totalPrice;

	/**
	 * @备注:订单类型（0 普通订单 1 拼团订单）
	 * @字段:order_type INT(10)
	 */
	private java.lang.Integer orderType;




	/**
	 * @备注:订单状态(1待付款 2 支付成功未发货 3 已发货（用户待收货） 4 已完成 5已关闭 6 退款中 )
	 * @字段:order_status INT(10)
	 */
	private Integer orderStatus;

	private java.math.BigDecimal returnYabi;

	private java.math.BigDecimal returnDuobi;
	/**
	 * @备注:配送费
	 * @字段:delivery_money DECIMAL(5)
	 */
	private java.math.BigDecimal deliveryMoney;

	private java.math.BigDecimal cashPayPrice;
	private java.lang.Integer allowPayType;
	/**
	 * @备注:优惠券
	 * @字段:use_coupon INT(10)
	 */
	private Long useCoupon;

	/**
	 * 优惠数额，如满199减20，则数额为20
	 */

	private Integer couponVal;

	/**
	 * 是否已提醒填写试用的调查问卷 0 未提醒 1 已提醒 ,默认0
	 */
	private Integer isNoticed;

	/**
	 * @备注:买家留言
	 * @字段:leaving_message TEXT(65535)
	 */
	private String leavingMessage;


	/**
	 * @备注:是否需要物流（0 不需要 1 需要 ）
	 * @字段:is_logistics INT(10)
	 */
	private java.lang.Integer isLogistics;


	/**
	 * @备注:物流公司代号
	 * @字段:logi_com VARCHAR(40)
	 */
	private java.lang.String logiCom;


	/**
	 * @备注:物流编号
	 * @字段:logistics_number VARCHAR(20)
	 */
	private java.lang.String logisticsNumber;

	private java.lang.String receiverPhone;//收货电话
	private java.lang.String receiverName;//收货性名
	private java.lang.String receiverAddress;//收货性名


	/**
	 * @备注:支付时间
	 * @字段:pay_datetime DATETIME(19)
	 */
	@JsonSerialize(using=DateJsonSerializer.class)
	@JsonDeserialize(using=DateJsonDeserializer.class)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss" )
	private java.util.Date payDatetime;


	/**
	 * @备注:评价、填写调查问卷时间
	 * @字段:pay_datetime DATETIME(19)
	 */
	@JsonSerialize(using=DateJsonSerializer.class)
	@JsonDeserialize(using=DateJsonDeserializer.class)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss" )
	private java.util.Date commentTime;

	/**
	 * @备注:商家备注（发货等）
	 * @字段:merchant_remarks VARCHAR(50)
	 */
	private java.lang.String merchantRemarks;


	/**
	 * @备注:客服备注
	 * @字段:cus_service_remarks VARCHAR(50)
	 */
	private java.lang.String cusServiceRemarks;

	/**
	 * @备注:完成时间
	 * @字段:complete_datetime DATETIME(19)
	 */
	@JsonSerialize(using=DateJsonSerializer.class)
	@JsonDeserialize(using=DateJsonDeserializer.class)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss" )
	private java.util.Date completeDatetime;


	/**
	 * @备注:支付方式
	 * @字段:pay_type INT(10)
	 */
	private Integer payType;


	/**
	 *用户端是否删除订单 0 已删除 1 未删除
	 */
	private Integer isDelete;

	/**
	 * @备注:创建时间
	 * @字段:gmt_datetime DATETIME(19)
	 */
	@JsonSerialize(using=DateJsonSerializer.class)
	@JsonDeserialize(using=DateJsonDeserializer.class)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss" )
	private java.util.Date gmtDatetime;


	/**
	 * @备注:修改时间
	 * @字段:upt_datetime DATETIME(19)
	 */
	@JsonSerialize(using=DateJsonSerializer.class)
	@JsonDeserialize(using=DateJsonDeserializer.class)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss" )
	private java.util.Date uptDatetime ;


	public Orders(){
	}

	public Orders(
		Long id
	){
		this.id = id;
	}



	public void setId(Long id) {
		this.id = id;
	}

	public Long getId() {
		return this.id;
	}

	public String getBuyTogetherCode() {
		return buyTogetherCode;
	}

	public void setBuyTogetherCode(String buyTogetherCode) {
		this.buyTogetherCode = buyTogetherCode;
	}

	public void setMuserId(Long muserId) {
		this.muserId = muserId;
	}

	public Long getMuserId() {
		return this.muserId;
	}

    public Muser getMuser() {
        return muser;
    }

    public void setMuser(Muser muser) {
        this.muser = muser;
    }

	public Integer getCouponVal() {
		return couponVal;
	}

	public void setCouponVal(Integer couponVal) {
		this.couponVal = couponVal;
	}

	public Date getCommentTime() {
		return commentTime;
	}

	public void setCommentTime(Date commentTime) {
		this.commentTime = commentTime;
	}

	public void setAddressId(Long addressId) {
		this.addressId = addressId;
	}

	public Long getAddressId() {
		return this.addressId;
	}

    public Address getAddress() {
        return address;
    }

    public void setAddress(Address address) {
        this.address = address;
    }

    public void setOrderNumber(String orderNumber) {
		this.orderNumber = orderNumber;
	}

	public String getOrderNumber() {
		return this.orderNumber;
	}

    public Integer getOrderType() {
        return orderType;
    }

    public void setOrderType(Integer orderType) {
        this.orderType = orderType;
    }

    public Integer getIsLogistics() {
        return isLogistics;
    }

    public void setIsLogistics(Integer isLogistics) {
        this.isLogistics = isLogistics;
    }

    public String getLogiCom() {
        return logiCom;
    }

    public void setLogiCom(String logiCom) {
        this.logiCom = logiCom;
    }

    public void setTotalPrice(java.math.BigDecimal totalPrice) {
		this.totalPrice = totalPrice;
	}

	public java.math.BigDecimal getTotalPrice() {
		return this.totalPrice;
	}

	public String getReceiverPhone() {
		return receiverPhone;
	}

	public void setReceiverPhone(String receiverPhone) {
		this.receiverPhone = receiverPhone;
	}

	public String getReceiverName() {
		return receiverName;
	}

	public void setReceiverName(String receiverName) {
		this.receiverName = receiverName;
	}

	public String getReceiverAddress() {
		return receiverAddress;
	}

	public void setReceiverAddress(String receiverAddress) {
		this.receiverAddress = receiverAddress;
	}

	public void setOrderStatus(Integer orderStatus) {
		this.orderStatus = orderStatus;
	}

	public Integer getOrderStatus() {
		return this.orderStatus;
	}


	public void setDeliveryMoney(java.math.BigDecimal deliveryMoney) {
		this.deliveryMoney = deliveryMoney;
	}

	public java.math.BigDecimal getDeliveryMoney() {
		return this.deliveryMoney;
	}

	public String getOutTradeNo() {
		return outTradeNo;
	}

	public void setOutTradeNo(String outTradeNo) {
		this.outTradeNo = outTradeNo;
	}

	public void setUseCoupon(Long useCoupon) {
		this.useCoupon = useCoupon;
	}

	public Long getUseCoupon() {
		return this.useCoupon;
	}

	public BigDecimal getReturnYabi() {
		return returnYabi;
	}

	public void setReturnYabi(BigDecimal returnYabi) {
		this.returnYabi = returnYabi;
	}

	public BigDecimal getReturnDuobi() {
		return returnDuobi;
	}

	public void setReturnDuobi(BigDecimal returnDuobi) {
		this.returnDuobi = returnDuobi;
	}

	public void setLeavingMessage(String leavingMessage) {
		this.leavingMessage = leavingMessage;
	}

	public String getLeavingMessage() {
		return this.leavingMessage;
	}

	public Integer getIsNoticed() {
		return isNoticed;
	}

	public void setIsNoticed(Integer isNoticed) {
		this.isNoticed = isNoticed;
	}

	public void setLogisticsNumber(String logisticsNumber) {
		this.logisticsNumber = logisticsNumber;
	}

	public String getLogisticsNumber() {
		return this.logisticsNumber;
	}

	public BigDecimal getCashPayPrice() {
		return cashPayPrice;
	}

	public void setCashPayPrice(BigDecimal cashPayPrice) {
		this.cashPayPrice = cashPayPrice;
	}

	public Integer getAllowPayType() {
		return allowPayType;
	}

	public void setAllowPayType(Integer allowPayType) {
		this.allowPayType = allowPayType;
	}

	public void setPayDatetime(java.util.Date payDatetime) {
		this.payDatetime = payDatetime;
	}

	public java.util.Date getPayDatetime() {
		return this.payDatetime;
	}


	public void setCompleteDatetime(java.util.Date completeDatetime) {
		this.completeDatetime = completeDatetime;
	}

	public java.util.Date getCompleteDatetime() {
		return this.completeDatetime;
	}


	public void setPayType(Integer payType) {
		this.payType = payType;
	}

	public Integer getPayType() {
		return this.payType;
	}

	public Integer getIsDelete() {
		return isDelete;
	}

	public void setIsDelete(Integer isDelete) {
		this.isDelete = isDelete;
	}

	public void setGmtDatetime(java.util.Date gmtDatetime) {
		this.gmtDatetime = gmtDatetime;
	}

	public java.util.Date getGmtDatetime() {
		return this.gmtDatetime;
	}


	public void setUptDatetime(java.util.Date uptDatetime) {
		this.uptDatetime = uptDatetime;
	}

	public java.util.Date getUptDatetime() {
		return this.uptDatetime;
	}

	public List<OrderGoods> getOrderGoodsList() {
		return orderGoodsList;
	}

	public void setOrderGoodsList(List<OrderGoods> orderGoodsList) {
		this.orderGoodsList = orderGoodsList;
	}

    public Integer getSourceType() {
        return sourceType;
    }

    public void setSourceType(Integer sourceType) {
        this.sourceType = sourceType;
    }

	public String getMerchantRemarks() {
		return merchantRemarks;
	}

	public void setMerchantRemarks(String merchantRemarks) {
		this.merchantRemarks = merchantRemarks;
	}

	public String getCusServiceRemarks() {
		return cusServiceRemarks;
	}

	public void setCusServiceRemarks(String cusServiceRemarks) {
		this.cusServiceRemarks = cusServiceRemarks;
	}
}
